<!DOCTYPE html>
<!--<html  data-layout-decorate="~{fragment/layout}">-->
<html data-layout-decorate="~{bbs/layout/layout}">
<head>
    <link rel="stylesheet"
          data-th-href="@{../../webjars/bootstrap/3.3.7-1/css/bootstrap.css}">
    <link rel="stylesheet"
          data-th-href="@{../../webjars/bootstrap/3.3.7-1/css/bootstrap-theme.css}">
    <link rel="stylesheet"
          th:href="@{../../webjars/bootstrap-table/1.9.1-1/bootstrap-table.css}">
    <link rel="stylesheet"
          th:href="@{../../webjars/bootstrap-select/2.0.0-beta1/dist/css/bootstrap-select.css}">
    <link
            data-th-href="@{../../webjars/bootstrapvalidator/css/bootstrapValidator.css}"
            rel="stylesheet" />
    <link data-th-href="@{../../dist/summernote.css}" rel="stylesheet" />
    <link data-th-href="@{../../dist/font-awesome-4.3.0/css/font-awesome.min.css}" rel="stylesheet">
    <script type="text/javascript"
            data-th-src="@{../../webjars/jquery/1.11.1/jquery.js}"></script>
    <script data-th-src="@{../../webjars/knockout/knockout.js}"
            type="text/javascript"></script>
    <script
            data-th-src="@{../../webjars/knockout-mapping/2.4.1/knockout.mapping.js}"
            type="text/javascript"></script>
    <script type="text/javascript"
            data-th-src="@{../../webjars/bootstrap/3.3.7-1/js/bootstrap.min.js}"></script>
    <script data-th-src="@{../../dist/summernote.min.js}"></script>
    <script data-th-src="@{../../dist/summernote-zh-CN.js}"></script>
    <script type="text/javascript"
            th:src="@{../../webjars/bootstrap-select/2.0.0-beta1/dist/js/bootstrap-select.js}"></script>
    <script type="text/javascript"
            th:src="@{../../webjars/bootstrap-select/2.0.0-beta1/dist/js/i18n/defaults-zh_CN.js}"></script>
    <script data-th-src="@{../../webjars/bootstrap-table/bootstrap-table.js}"></script>
    <script
            data-th-src="@{../../webjars/bootstrapvalidator/js/bootstrapValidator.js}"></script>
    <script
            data-th-src="@{../../webjars/bootstrap-table/locale/bootstrap-table-zh-CN.js}"></script>
    <script data-th-src="@{../../webjars/bootbox/4.4.0/bootbox.js}"></script>
    <script type="text/javascript"
            data-th-src="@{../../bootstrap-table/knockout.bootstrapTable.ljc.js}"></script>
    <title>帖子管理</title>
    <script type="text/javascript">
        $(function(){
            /* $('#mytable').bootstrapTable({
                sidePagination: "server",
                url : '/table/page'
            }); */
            var data =  {
                tableParams : {
                    //toolbar: '#toolbar',  //工具栏的ID
                    url : 'manage/page'
                },
                urls : {
                    delete : 'manage/delete',
                    update : 'edit',
                    add : 'edit',
                    search:'search'
                },
                queryCondition : {
                    title : '',
                    testId : ''
                }
            };
            ko.applyBindings(new BsTableViewModel(data),document.getElementById('scroing_table_div'));

        });

    </script>
</head>
<body>
<section data-layout-fragment="content">
    <div id="scroing_table_div" class="container">

        <!-- 查询窗口 -->
        <div class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
            <div class="modal-dialog" role="document">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                        <h4 class="modal-title" id="myModalLabel">查询</h4>
                    </div>
                    <div class="modal-body">
                        <!-- 以下为要查询的的内容 -->
                        <div class="form-group">
                            <label for="search_title">评分项</label>
                            <input id="search_title" type="text" class="form-control" name="title" data-bind="value:queryCondition.title" placeholder="评分项">
                        </div>
                        <!--<div class="form-group">
                            <label for="search_testId">考试</label>
                            &lt;!&ndash; <input id="search_testId" type="text" class="form-control" name="type" data-bind="value:queryCondition.type"> &ndash;&gt;
                            <select id="search_testId" class="form-control" name="testId" data-bind="value:queryCondition.testId">
                                <option value="">请选择</option>
                                <option data-th-each="test:${tests}" data-th-value="${test.id}" data-th-text="${test.name}">考试1</option>
                            </select>
                        </div>-->
                        <!-- 以上为要查询的内容 -->
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-primary" data-dismiss="modal" data-bind="click:queryClick"><span class="glyphicon glyphicon-search" aria-hidden="true"></span>&nbsp;查询</button>
                        <button type="button" class="btn btn-default" data-dismiss="modal" data-bind="click:clearClick"><span class="glyphicon glyphicon-trash" aria-hidden="true"></span>&nbsp;清空</button>
                    </div>
                </div>

            </div>
        </div>

        <!-- 工具栏 -->
        <div id="toolbar" class="btn-group">
            <button data-bind="click:deleteClick" type="button"
                    class="btn btn-default">
                <span class="glyphicon glyphicon-remove" aria-hidden="true"></span>删除
            </button>
            <!--<button data-bind="click:searchClick" type="button"
                    class="btn btn-default">
                <span class="glyphicon glyphicon-search" aria-hidden="true"></span>查询
            </button>-->

        </div>

        <!-- 表格，表头里定义了表要显示的字段，data-formatter 里只能跟一个方法名 -->
        <table id="mytable" data-bind="bootstrapTable:$root">
            <thead>
            <tr>
                <th data-checkbox="true"></th>
                <!-- <th data-field="id">ID</th> -->
                <th data-field="title">帖子标题</th>
                <!--<th data-field="course.name">课程</th>-->
                <!--<th data-field="sysUser.name">作者</th>-->
            </tr>
            </thead>
        </table>
    </div>
</section>
</body>

</html>